﻿using System.Collections.Generic;
using SARS.Biz.Facades;
using SARS.DAO;
using SARS.DAO.Facades;
using SARS.Entity;

namespace SARS.Biz
{
    public class UserBO : IUserBO
    {
        private readonly IUserDAO _dao = new UserDAO();

        public List<UserEntity> RetrieveUserAll()
        {
            return _dao.RetrieveUserAll();
        }

        public UserEntity RetrieveUserById(int userId)
        {
            return _dao.RetrieveUserById(userId);
        }

        public UserEntity RetrieveUserByUserName(string userName)
        {
            return _dao.RetrieveUserByUserName(userName);
        }

        public List<UserEntity> RetrieveUserByRoleId(int roleId)
        {
            return _dao.RetrieveUserByRoleId(roleId);
        }

        public List<StudentEntity> RetrieveStudentByCourseId(int courseId)
        {
            return _dao.RetrieveStudentsByCourseId(courseId);
        }

        public List<TutorEntity> RetrieveTutorsByGroupId(int groupId)
        {
            return _dao.RetrieveTutorsByGroupId(groupId);
        }

        public List<StudentEntity> RetrieveStudentByGroupId(int groupId)
        {
            return _dao.RetrieveStudentsByGroupId(groupId);
        }


        public List<StudentEntity> SearchStudentByName(string text)
        {
            return _dao.SearchStudentByName(text);
        }

        public List<TutorEntity> GetAllTutorOutOfGroup(int groupId)
        {
            return _dao.GetAllTutorOutOfGroup(groupId);
        }


        public List<StudentEntity> GetAllCourseStudentOutOfGroup(int groupId, int courseId)
        {
            return _dao.GetAllCourseStudentOutOfGroup(groupId, courseId);
        }
    }
}